/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.andersonlab.trailsdm.control;

import org.andersonlab.trailsdm.content.Content;
import org.andersonlab.trailsdm.data.Trail;

/**
 *
 * @author jcanderson
 */
public interface DisplayController {
/*The following control methods are all for manipulating the current Trail
* The perform operations on the runtime of the site, such as setting what
* Trail is running, advancing it to the next slide, etc.
* 
* The Controller keeps track of the current index of the Trail.  Trail and
* other Datum classes don't actuall *do* anything...they really are just
* data elemenets.  The controller interfaces manipulate their values.
*/
    /**
     * The Controller always has one trail loaded.
     * To change what's loaded, you call loadTrail
     * @param trail 
     */
    public void loadTrail(Trail trail);

    /**
     * Gets whatever trail is currently loaded
     * @return 
     */
    public Trail getCurrentTrail();
    
    /**
     * Causes a switch to the editing mode currently implemented
     */
    public void setTrailEditMode();
    
    /**
     * Causes a switch to run mode, where it goes to whatever was
     * the last started content
     */
    public void setTrailRunMode();
    
    /**
     * Causes the Trail to advance "howmany" Content elements are
     * requested.
     * @param howmany 
     */
    public void goForwardOrReverse(int howmany);
    
    /**
     * Causes the Trail to advance to a specific index
     * @param index 
     */
    public void goTo(int index);
    
    /**
     * Causes the browser to advance to a specific Conetent element
     * and temporarily divert from the Trail
     * @param content 
     */
    public void divertTo(Content content);
}
